package teamproject.visualization.gui;

import javax.media.j3d.AmbientLight;
import javax.media.j3d.BoundingSphere;
import javax.media.j3d.DirectionalLight;
import javax.vecmath.Color3f;
import javax.vecmath.Vector3f;

public class Lighter {

	private BoundingSphere bound;
	private Color3f lColor1;
	private Vector3f lDir1;
	private Color3f alColor;

	public Lighter(BoundingSphere bound) {
		this.bound = bound;
		lColor1 = new Color3f(0.7f, 0.7f, 0.7f);
		lDir1 = new Vector3f(-1.0f, -1.0f, -1.0f);
		alColor = new Color3f(0.2f, 0.2f, 0.2f);
	}

	public AmbientLight getAmbientLight() {
		AmbientLight aL = new AmbientLight(alColor);
		aL.setInfluencingBounds(bound);
		return aL;
	}

	public Color3f getAmbientLightColor() {
		return alColor;
	}

	public DirectionalLight getDirectionalLight() {
		DirectionalLight dL = new DirectionalLight(lColor1, lDir1);
		dL.setInfluencingBounds(bound);
		return dL;
	}

	public Color3f getDirectionalLightColor() {
		return lColor1;
	}

	public Vector3f getLightDirection() {
		return lDir1;
	}

	public void setAmbientLightColor(Color3f color) {
		alColor = color;
	}

	public void setDirectionalLightColor(Color3f color) {
		lColor1 = color;
	}

	public void setLightDirection(Vector3f direction) {
		lDir1 = direction;
	}
}
